Skip to contents

Fitting models

Run and preview batch model fits.

fit_models()
Run batch regressions across multiple DVs and datasets
preview_fit()
Preview all models that will be run

Model specifications

Build and modify the right-hand side of model formulas.

model_spec() print(<model_spec>) as.character(<model_spec>)
Create a model specification
add_terms()
Add terms to a model specification
drop_terms()
Remove terms from a model specification
replace_term()
Replace a term in a model specification
add_interaction()
Add an interaction to a model specification
update(<model_spec>)
Update a model specification using formula syntax
to_formula()
Convert a model_spec to an RHS-only formula

Extra arguments and formula parts

Carry what a model needs beyond its main terms: arguments for the fitting function, and formula sections after |.

set_args()
Set extra arguments for the fitting function
drop_args()
Remove extra arguments from a model specification
modify_arg()
Modify one extra argument of a model specification
spec_args()
Extra arguments of a model specification
set_parts()
Set the formula parts after the main terms
add_part()
Add a formula part after the existing ones
modify_part()
Modify one formula part of a model specification
spec_parts()
Formula parts of a model specification